﻿.detailpage section[role=main] {
    margin-left: 120px;
    margin-right: 120px;
}

#detail-grid {
    height: 100%;
    display: -ms-inline-grid;
    -ms-grid-columns: 183px 40px 600px 40px 1fr;
    -ms-grid-rows: 1fr;
}

    #detail-grid div td tr th span {
        margin: 0;
        padding: 0;
    }

#currency-small-list-view {
    width: 280px;
    height: 500px;
    -ms-grid-column: 5;
    -ms-grid-row: 1;
}

canvas {
    -ms-grid-column: 3;
    -ms-grid-row: 1;
}

#currency-history {
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    font-family: 'Segoe UI';
}

    #currency-history .rate-cell {
        width: 100px;
        text-align: center;
    }

    #currency-history .date-cell {
        width: 40px;
        text-align: center;
    }

    #currency-history .currency-history-headers {
        margin-bottom: 0;
    }

        #currency-history .currency-history-headers span {
            background-color: rgba(220,220,220,0.5);
            border: 1px solid rgba(220,220,220,1);
            padding: 10px;
            font-weight: bold;
            display: inline-block;
            margin: 0px;
        }

            #currency-history .currency-history-headers span.rate-cell {
                border-left: none;
            }

    #currency-history .currency-history-table-container {
        overflow-y: auto;
        height: 450px;
    }

        #currency-history .currency-history-table-container .currency-history-table {
            margin-top: 0;
            border-collapse: collapse;
        }

            #currency-history .currency-history-table-container .currency-history-table td {
                border: 1px solid rgba(220,220,220,1);
                padding: 10px;
            }

.currency-template-tile {
    text-align: center;
    font-family: 'Segoe UI Semilight';
    width: 260px;
    height: 154px;
    display: -ms-grid;
    -ms-grid-columns: 20px 64px 20px 116px 20px;
    -ms-grid-rows: 20px 30px 20px 64px 20px;
}

.currency-header {
    -ms-grid-column: 2;
    -ms-grid-row: 2;
    width: 64px;
    height: 30px;
    font-size: 20px;
}

.currency-flag {
    -ms-grid-column: 2;
    -ms-grid-row: 4;
}

.currency-data-container {
    -ms-grid-column: 4;
    -ms-grid-row: 2;
    -ms-grid-row-span: 3;
    display: -ms-inline-grid;
    -ms-grid-rows: 15px 5px 14px 5px 30px 5px 15px 5px 20px;
    -ms-grid-columns: 51px 5px 80px;
}

.currency-rate-tag {
    -ms-grid-column: 1;
    -ms-grid-row: 1;
    font-size: 15px;
}

.currency-rate {
    -ms-grid-column: 3;
    -ms-grid-row: 5;
    font-size: 30px;
}

.currency-invert-tag {
    -ms-grid-column: 1;
    -ms-grid-row: 7;
    font-size: 15px;
}

.currency-amount {
    -ms-grid-column: 1;
    -ms-grid-row: 3;
    font-size: 14px;
}

.currency-invert-rate {
    -ms-grid-column: 3;
    -ms-grid-row: 9;
    font-size: 20px;
}

@media screen and (-ms-view-state: snapped) {
    .detailpage section[role=main] {
        margin-left: 20px;
        margin-right: 20px;
    }

    #detail-grid {
        display: -ms-inline-grid;
        -ms-grid-columns: 1fr;
        -ms-grid-rows: 1fr;
    }

    #currency-history .currency-history-table-container {
        -ms-grid-column: 1;
        -ms-grid-row: 1;
        height: calc(100% - 60px);
    }

    canvas {
        display: none;
    }

    #currency-small-list-view {
        display: none;
    }

}

@media screen and (-ms-view-state: fullscreen-portrait) {
    .detailpage section[role=main] {
        margin-left: 100px;
        margin-right: 100px;
    }

    #detail-grid {
        display: -ms-inline-grid;
        -ms-grid-columns: 260px 20px 260px;
        -ms-grid-rows: 500px 20px 500px;
    }

    #currency-small-list-view {
        -ms-grid-column: 3;
        -ms-grid-row: 1;
    }

    canvas {
        -ms-grid-column-span:3;
        -ms-grid-column: 1;
        -ms-grid-row:3;
    }

    #currency-history {
        -ms-grid-column: 1;
        -ms-grid-row: 1;
    }
}
